home *** CD-ROM | disk | FTP | other *** search
- /*
- DU_LIB v2
- Gem Window Management & Dialog Library For Lattice C
- ©1994,95, by Craig Graham.
-
- Based on the DU_LIBv1 Library for HiSoft Basic.
- */
-
- /*
- ST-Guide Hypertext Help Support
- */
-
- #include <AV_PROT.H>
- #include "DULIB.H"
-
- char application_helpfile[FMSIZE];
-
- void Set_application_helpfile(char *h)
- {
- sprintf(application_helpfile, "%s", h);
- Set_key_callback(0x6200, &dialog_help);
- }
-
- void Set_dialog_help_topic(short dialog, char *h)
- {
- strncpy(dialog_details[dialog].help_topic,h,29);
- }
-
- char av_message[FMSIZE];
-
- /*
- Response to a help keypress in a dialog with it's help property active
- */
- short dialog_help(void)
- {
- struct av_msg {
- short cmd;
- short apid;
- short j1;
- char *path;
- char *command_line;
- short j2;
- } buf;
- short stg_apid;
- short wh,d;
-
- wind_get(cr_wind_handle,WF_TOP,&wh,&d,&d,&d);
- if ((WF_TOP)&&(windows[wh].window_type!=wt_null))
- {
- d=windows[wh].the_dialog;
- sprintf(av_message,"*:\\%s %s",application_helpfile,dialog_details[d].help_topic);
- }else{
- sprintf(av_message,"*:\\%s",application_helpfile);
- }
-
- stg_apid=appl_find("ST-GUIDE");
-
- buf.cmd=VA_START;
- buf.apid=AESid;
- buf.j1=buf.j2=0;
- buf.path=av_message;
- buf.command_line=NULL;
-
- appl_write(stg_apid,16,&buf);
-
- return TRUE;
- }
-